package org.bigjava.novelplatform.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.bigjava.novelplatform.common.enums.Subscribe;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName book_rack
 */
@TableName(value ="book_rack")
@Data
public class BookRack implements Serializable {

    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 分组名称,限制30字符,默认值为空字符
     */
    @Length(max = 30)
    private String groupName;

    /**
     * 排序字段
     */
    private Integer sort;

    /**
     * 书籍id
     */
    private Integer bookId;

    /**
     * 书籍信息,数据库中不存在的字段
     */
    @TableField(exist = false)
    private Books books;

    /**
     * 加入时间
     */
    private Date joinTime;

    /**
     * 阅读进度章节id
     */
    private Long readChapterId;

    /**
     * 最后位置章节id
     */
    private Long lastPositionId;

    /**
     * 最后的阅读时间
     */
    private Date lastReadTime;

    /**
     * 订阅状态，0未订阅
     */
    private Subscribe subscribe;

    /**
     * 贡献值
     消费得贡献值
     */
    private Long contribution;

    /**
     * 逻辑删除
     0未删除；1删除
     */
    private Integer deleteState;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}